<script>
	export default {
		onLaunch: function(e) {
			if (this.user.access_token) {
				this.$store.dispatch('user/loginSuccess');
				if (e.path != 'subPackA/pages/detail/detail') {
					uni.switchTab({
						url: '/pages/index/index'
					})
				}
			}else {
				if(e.path == 'subPackA/pages/detail/detail') {
					
				} else if (e.path != 'pages/registered/registered') {
					uni.reLaunch({
						url: 'pages/loginBefore/loginBefore'
					})
				} else {
					if (!e.query.loginType) {
						uni.reLaunch({
							url: 'pages/loginBefore/loginBefore'
						})
					}
				}
			}
			this.$u.api.getBase().then(res => {
				this.global.base = res;
			})
			this.$u.api.getQiniuToken().then(res => {
				this.global.upLoadToken = res.token
				this.global.baseImgUrl = res.domain
			})
		}
	}
</script>

<style>
	/*每个页面公共css */
	page {
		background-color: #000000;
	}

	.pulse-one {
		animation: pulse 2s ease-in-out infinite;
		display: block;
	}

	@keyframes pulse {

		from {
			-webkit-transform: scale3d(1, 1, 1);
			transform: scale3d(1, 1, 1);
		}

		50% {
			-webkit-transform: scale3d(1.08, 1.08, 1.08);
			transform: scale3d(1.08, 1.08, 1.08);
		}

		to {
			-webkit-transform: scale3d(1, 1, 1);
			transform: scale3d(1, 1, 1);
		}

	}
	.backImg{
		width: 8.53vw;
		height: 8.53vw;
		position: absolute;
		top: 4.27vw;
		left: 4.27vw;
		/* background-color: red; */
		z-index: 999;
	}
	.num-img{
		width: 10.67vw;
		height: 4.27vw;
		background-color: #323232;
		display: block;
	}
</style>
